﻿<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>
<%@ Register TagPrefix="mnu" Namespace="Mysoft.Map.Application.Menus" Assembly="Mysoft.Map.Application.Components" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WF_ProcessInitiate_Form_lr.aspx.vb" Inherits="MyWorkflow.WF_ProcessInitiate_Form_lr" enableviewstate="false" %>

<HTML>
	<HEAD>
		<title></title>		
		<link rel="stylesheet" type="text/css" href="/_nav/menu.css">
		<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
		<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
		<link rel="stylesheet" type="text/css" href="/_nav/tabs.css">		
		<link rel="stylesheet" type="text/css" href="/_common/styles/select.css">
		<link rel="stylesheet" type="text/css" href="/MyWorkflow/css/AttachMent_menu.css">
		<script language="javascript" src="/_common/scripts/global.js"></script>
		<script language="javascript" src="/_common/scripts/Details.js"></script>
		<script language="javascript" src="/_controls/settings.aspx"></script>
		<script language="javascript" src="/_controls/util/util.js"></script>
		<script language="javascript" src="/_controls/datetime/date.js"></script>
		<script language="javascript" src="/_controls/datetime/time.js"></script>
		<script language="javascript" src="/_controls/number/number.js"></script>
		<script language="javascript" src="/_controls/lookup/map_lookup.js"></script>
		<script language="javascript" src="/_nav/menu.js"></script>
		<script language="javascript" src="/_forms/FormBase.js"></script>
		<script language="javascript" src="Workflow.js"></script>
		<script language="javascript" src="WF_CreateObject.js"></script>
		<script language="javascript" src="WF_ProcessInitiate_Form.js"></script>
		<script language="javascript" src="/PubProject/js/PubProject_WF.js"></script>
		<script language="javascript" src="/_controls/upfile/UpFile.js"></script>
		<script language="javascript" src="WF_AttachMent_menu.js"></script>
		<style>
			div.bottom{width:100%;}
			table{width:100%;}
			iframe{OVERFLOW: auto; WIDTH: 100%; HEIGHT: 100%}
			.isshow {font-size: 12px;border: 1px solid #94a6b5;top: 1px;left: 1px;height: 17px;margin-right: 1px;
	            position: relative;padding: 5px;padding-top: 2px;padding-bottom: 3px;background-color: #ffffff;cursor: hand;}
		</style>
		<SCRIPT LANGUAGE="javascript" FOR="oframe" EVENT="NotifyCtrlReady">
			loadDoc();
		</SCRIPT>
		<script language="javascript">
			//在线帮助文件
			var _MyHelpfile = "/MyWorkflow/help/流程管理/新建流程/发起流程.htm";
			
			function setInterface(){			    
	            sDocType = $id("txtDocumentType").value;
	            sMode = $id("txtMode").value;
			    try{
                    if(sMode == "3"){
                        $id("divStation").style.display = "none";
                    }
                    
                    var bodyHeight,bodyWidth;
                    if(document.body.offsetHeight - $id("divMenu").offsetHeight - $id("tab_property").offsetHeight - (sMode=="3"?0:$id("divStation").offsetHeight) - $id("Td1").offsetHeight - 20 < 0){
                	    bodyHeight = window.screen.availHeight - 150;
                	    bodyWidth = window.screen.availWidth - 10;
                    }else{
                	    bodyHeight = document.body.offsetHeight;
                	    bodyWidth = document.body.clientWidth;
                    }

                    if(sDocType == "0" || sDocType == "2"){
                        $id("Span4").style.display = "none";
                        $id("divForm").style.height = bodyHeight - $id("divMenu").offsetHeight - $id("tab_property").offsetHeight - (sMode=="3"?0:$id("divStation").offsetHeight) - $id("Td1").offsetHeight - 20;
                        $id("divForm").style.width = bodyWidth - 17;
                        $id("tdDoc").style.height = bodyHeight - $id("divMenu").offsetHeight - $id("tab_property").offsetHeight - 20 ;
                    }else{
                        $id("divForm").style.height = bodyHeight - $id("divMenu").offsetHeight - $id("tab_property").offsetHeight - $id("Td1").offsetHeight - (sMode=="3"?0:$id("divStation").offsetHeight) - 20;
                        $id("divForm").style.width = bodyWidth - 17;
                        $id("tdDoc").style.height = bodyHeight - $id("divMenu").offsetHeight - $id("tab_property").offsetHeight - 20 ;
                    }
                    //bug 45145 显示问题  chenxy 20090428 18:00 begin 
                    if(document.all('txtHandleText').parentNode.offsetWidth>0)
                        document.all("txtHandleText").style.width = document.all('txtHandleText').parentNode.offsetWidth * 0.80+'px';
                    //bug end
                }
                catch(e){setTimeout(setInterface(),100);}
            }
            
            //控制文档/表单编辑区高度
            function changeDivForm(){
                if($id("tab_property").style.display == "inline"){
                    $id("divForm").style.height = document.body.offsetHeight - $id("divMenu").offsetHeight - $id("tab_property").offsetHeight - (sMode=="3"?0:102) - $id("Td1").offsetHeight - 20;  
                    $id("tdDoc").style.height = document.body.offsetHeight - $id("divMenu").offsetHeight - $id("tab_property").offsetHeight - 20 ;
                }else{
                    $id("divForm").style.height = document.body.offsetHeight - $id("divMenu").offsetHeight - (sMode=="3"?0:102) - $id("Td1").offsetHeight - 20;
                    $id("tdDoc").style.height = document.body.offsetHeight - $id("divMenu").offsetHeight - 20 ;
                }
                if($id("txtDocumentType").value == "1" || $id("txtDocumentType").value == "3"){
                    $id("oframe").style.height = $id("divForm").style.height;
                    $id("oframe").style.width = $id("divForm").style.width;//BUG 45339 45014 高度变化 sunfx 2009年5月8日19:14:44 END
                }
            }
            //重绘oframe控件大小
            function ResetOframeSize() {
                if (document.getElementById("oframe")) {
                    var o = $id("isshow");
                    isShow(o);
                }
            }

            //加载第一个标签页
            function LoadFirtTab() {
                if ($id("tab_0").style.display != "none") return;
                loadTab('0');
                ResetOframeSize();
                setTimeout(ResetOframeSize, 1);
            }
		</script>
	</HEAD>
	<body onload="window_onload();" onbeforeunload="oprBeforeClose();">
		<div id="divMenu" style="height:48px">
			<mnu:AppFormMenu id="appFormMenu" runat="server"></mnu:AppFormMenu>
		</div>
		<div id="tab0_div" style="DISPLAY: inline;padding:5px;width:100%;">
		    <div class="tab" id="tab_property" style="background-color:white;DISPLAY: inline;padding:3px 3px 3px 3px;border: 1 #889dc2 solid;OVERFLOW:hidden;height:60px;">
				<table id="tblProperty" width="100%" cellpadding="0"
					cellspacing="0">
					<tr>
						<td>
							<cnt:AppForm id="appForm" runat="server" onbeforesave="oprBeforeSave()" onaftersave="oprAfterSave()" processtype="xmlhttp"></cnt:AppForm>
						</td>
					</tr>
				</table>
			</div>
			<div id="tdDoc" class="bottom" onresize="changeDivForm()">
                <table cellspacing="0" cellpadding="0" border="0" height="100%">
		        <tr>
			        <td id="Td1" style="height:25px">
                        <table cellspacing="0" cellpadding="0" class="tabBar" mode="noGlow">
                            <tr>
                                <td nowrap valign="bottom">
                                    <span id="Span1" tabID="tab_0" tabindex="0" class="tab tabOn" onclick="LoadFirtTab()">
                                        业务信息 </span><span id="Span4" tabID="tab_3" tabindex="0" class="tab" onclick="loadTab('3')">
                                        附件及意见 </span><span id="Span2" tabID="tab_1" tabindex="1" class="tab" onclick="loadTab('1')">
                                            审批流程 </span><span id="Span3" tabID="tab_2" tabindex="2" class="tab" onclick="loadTab('2')">
                                                历史表单 </span>
                                </td>
                                <td valign="bottom" align="right"><span id="isshow" class="isshow" onclick="isShow(this)">隐藏</span></td>
                            </tr>
                        </table>
                        <hr id="Hr1" class="tabGlow">
		                <hr id="Hr2" class="tabGlow">
                     </td>
                  </tr>
                  <tr>
                    <td>
                        <div id="tab_0" class="tab" style="DISPLAY:inline;padding:2px">
                            <div id ="divForm" style="OVERFLOW: auto;SCROLLBAR-FACE-COLOR:#d4ddef;SCROLLBAR-HIGHLIGHT-COLOR:#d4ddef;SCROLLBAR-SHADOW-COLOR:#d4ddef;	SCROLLBAR-3DLIGHT-COLOR:#d4ddef;SCROLLBAR-ARROW-COLOR:#3f6dad;SCROLLBAR-TRACK-COLOR:#f1f3f9;SCROLLBAR-DARKSHADOW-COLOR:#d4ddef;SCROLLBAR-BASE-COLOR:#000000; background-color:White;width:100%">
                                <table cellspacing="0" cellpadding="0" border="0">
                                    <tr>
                                        <td valign="top">
                                        <iframe scrolling="no" id="appIframe_HtmlForm" name="appIframe_HtmlForm" src="blank.htm"
                                            frameborder="0"></iframe>
                                        </td>
                                    </tr>
                                    <tr valign="top" height="1px">
                                        <td><div id="divAttachMent" style="width: 100%;"></div><div id="divReplyBiz" style="width: 100%;"></div></td>
                                    </tr>
                                </table>
                             </div>
                            <div id="divStation" style="HEIGHT:95px;">
                                <table style="BORDER: #889dc2 1px solid;height:100%;" cellspacing="0" cellpadding="0" border="0">
	                                <tr>
		                                <td colspan ="3" valign="top" style="height:10px;"><table border="0" cellspacing="0" style="height:100%;width: 100%;background-color: #7288AC;border: #abc0e7 1px solid;border-right: #00377a 1px solid;border-bottom: #00377a 1px solid;">
										                <tr><td></td></tr>
										            </table>
		                                </td>
	                                </tr>
		                            <tr height="25px" valign="bottom">
			                                <td width="6%" class="req" align="center">岗位</td>
			                                <td align="left">
			                                    <span id="Station" onblur="setValueToStation(this)" class="selectBox" typename="mapType" req="1" readOnly ro="0" value="" style="width:40%" >
											        <table id="_StationGUID_Table" cellspacing="0" cellpadding="2"style="display: none;">
												        <tr height="18">
													        <td nowrap val="">
													        </td>
												        </tr>
											        </table>
										        </span>										   
										    </td>
										    <td></td>
		                              </tr>
		                              <tr>
		                                    <td valign="middle" align="center" class="req">发起<br/>说明</td>
			                                <td valign="middle" align="left">
			                                <textarea id="txtHandleText" style="WIDTH:80%;HEIGHT: 40px;" maxlength="1000"></textarea>
			                                </td>
			                                <td valign="middle" width="25%"><a id="cInit" href="#" style="display:none;" onclick="cInit_click()"><img src="images/init.gif" onmousemove="this.src='images/init1.gif'" onmouseout="this.src='images/init.gif'" border="0" /></a></td>
		                              </tr>
	                            </table>
	                        </div>
	                        <!--提示框开始-->
	                        <div id="divMsg" style="position:absolute;z-index:999;display:none;line-height:25px;background:url(images/bground.gif);padding:3px 8px 3px 8px;">
                                <div style="text-align:left;width:100%;font-weight:bold;color:#15428b;">&nbsp;系统提示！</div>
                                <div style="width:100%">
	                                <table style="table-layout:fixed;height:100%;font-size:9pt;width:100%">
	                                    <tr>
	                                        <td style="width:55px;" valign="middle" align="center"><img src="images/icon-question.gif" /></td>
	                                        <td valign="middle">
	                                            <div style="height:60px;padding-top:16px;">&nbsp;&nbsp;&nbsp;&nbsp;业务数据发生变化，表单已自动同步，请确认是否要发起？</div>
	                                            <div style="text-align:center;">&nbsp;&nbsp;&nbsp;<button onclick="doOK()">确 定</button>&nbsp;<button onclick="doCancel()">取 消</button></div>
	                                        </td>
                                        </tr>                    
	                                </table>
                                </div>
                            </div>
                            <!--提示框结束-->
                        </div>
                        <div id="tab_1" class="tab" style="padding:2px;">
                            <table cellspacing="0" cellpadding="0" border="0" height="100%">
                                <tr>
                                    <td valign="top">
                                        <iframe id="tab1_div_if" src="" frameborder="0" scrolling="no"></iframe>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="tab_2" class="tab" style="padding:2px;">
                            <table cellspacing="0" cellpadding="0" border="0" height="100%">
                                <tr>
                                    <td valign="top">
                                        <iframe id="tab2_div_if" src="" frameborder="0" scrolling="no"></iframe>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="tab_3" class="tab" style="padding:2px;width:100%;height:100%;overflow-y:auto;SCROLLBAR-FACE-COLOR:#d4ddef;SCROLLBAR-HIGHLIGHT-COLOR:#d4ddef;SCROLLBAR-SHADOW-COLOR:#d4ddef;SCROLLBAR-3DLIGHT-COLOR:#d4ddef;SCROLLBAR-ARROW-COLOR:#3f6dad;SCROLLBAR-TRACK-COLOR:#f1f3f9;SCROLLBAR-DARKSHADOW-COLOR:#d4ddef;SCROLLBAR-BASE-COLOR:#000000;">
                            <table cellspacing="0" cellpadding="0" border="0">
                                <tr>
                                    <td valign="top"><div id="_divAttachMent" style="width: 100%;"></div><div id="divReplyOffice" style="width: 100%;"></div></td>
                                </tr>
                            </table>
                         </div>
                         </td>
                         </tr>
                    </table>
            </div>
		</div>
		<!-- 这里用来定义需要显示的审批附件右键菜单 -->
        <div id='menu' class='skin1'>
            <div class='menuitems' action='select'>查看</div>
            <div class='menuitems' action='checkOut'>签出</div>
            <div class='menuitems' action='edit'>编辑</div>
            <div class='menuitems' action='checkIn'>签入</div>
            <div class='menuitems' action='rename'>重命名</div>
            <div class='menuitems' action='del'>删除</div>
            <div class='menuitems' action='attribute'><span style='float: left'>属性 </span><span style='float: right; vertical-align: middle;'><img id='imgA' src='images/nav0_arrow_right.gif' /></div>
        </div>
        <div id="divAttribute" style="display:none;position: absolute;width:180px;height:75px">
            <table border="0" bgcolor="#FFFFFF" style="font-size: 12px;border: 1 solid black;" cellspacing="0">
                <tr>
                    <td>修改人：</td>
                    <td></td>
                </tr>
                <tr>
                    <td nowrap>修改时间：</td>
                    <td></td>
                </tr>
                <tr>
                    <td>创建人：</td>
                    <td></td>
                </tr>
                <tr>
                    <td>创建时间：</td>
                    <td></td>
                </tr>
            </table>
        </div>
        <!-- 右键菜单结束-->
    
        
    
    <form id="Form1" runat="server" >
    <input id="txtMode" value='<% =Request.QueryString("mode") %>' style="DISPLAY:none"/>
    <input id="txtProcessGUID" value='<% =Request.QueryString("processguid") %>' style="DISPLAY:none"/>
    <input id="txtOId" value='<% =Request.QueryString("oid") %>' style="DISPLAY:none"/>
    <input id="txtBusinessGUID" type="text" runat="server" style="DISPLAY:none"/>
    <input id="txtOriginalHTML" type="hidden" style="DISPLAY:none"/>
    <asp:textbox id="ExtendFormUrl" style="DISPLAY:none" runat="server"></asp:textbox>
    <asp:textbox id="txtDocumentDiscuss" runat="server" style="DISPLAY:none"></asp:textbox>
    <asp:textbox id="txtDocumentType" style="DISPLAY:none" runat="server"></asp:textbox>
    <asp:textbox id="txtDocumentGUID" style="DISPLAY:none" runat="server"></asp:textbox>
    <asp:textbox id="txtBusinessTypeGUID" style="DISPLAY: none" runat="server"></asp:textbox>
    <asp:textbox id="txtStepGUID" style="DISPLAY: none" runat="server"></asp:textbox>
    <asp:textbox id="txtCanDocModify" style="DISPLAY: none" runat="server"></asp:textbox>
    <asp:textbox id="txtCanDocNumber" style="DISPLAY: none" runat="server"></asp:textbox>
    <asp:textbox id="txtCanUserModify" style="DISPLAY: none" runat="server"></asp:textbox>
    <asp:textbox id="txtDomainXML" style="DISPLAY:none" runat="server" TextMode="MultiLine"></asp:textbox>
    <asp:textbox id="txtDispBusinessDomain" style="DISPLAY:none" runat="server"></asp:textbox>
    <asp:textbox id="txtEditBusinessDomain" style="DISPLAY:none" runat="server"></asp:textbox>
    <asp:textbox id="txtCanChildBU" style="DISPLAY:none" runat="server"></asp:textbox>
    <asp:textbox id="txtInterfaceStyle" style="DISPLAY:none" runat="server"></asp:textbox>
    <asp:textbox id="txtNameCodingRule" style="DISPLAY:none" runat="server"></asp:textbox>
    <asp:textbox id="txtCodeCodingRule" style="DISPLAY:none" runat="server"></asp:textbox>
    <asp:textbox id="txtIdeapBusinessDomain" style="DISPLAY:none" runat="server"></asp:textbox>
    <asp:textbox id="txtProcessCompareDomain" style="DISPLAY:none" runat="server"></asp:textbox>
	
    <asp:textbox id="txtNum" style="DISPLAY:none" runat="server"></asp:textbox> 
    <asp:textbox id="txtMonth" style="DISPLAY:none" runat="server"></asp:textbox>
    <asp:textbox id="txtYear" style="DISPLAY:none" runat="server"></asp:textbox>
    <input id="txtBUCode" type="text" runat ="server" style="DISPLAY:none"/>
    <input id="txtBUName" type="text" value='<% =Session("BUName") %>' style="DISPLAY:none"/>
    <input type="hidden" id="txtStepSpStatus" runat ="server" />
    
    </form>
	</body>
	<script language="javascript">
        //去掉“流程属性”appForm的边框和边距
    	$id("appForm_tab0").style.padding = "0px"; 
    	$id("appForm_tab0").style.border = "0px";
    	$id("appForm_tab0").style.backgroundColor = "white";
    	$id("tblProperty").style.display = "inline";
    	
    	setInterface();
	</script>

</HTML>